<template>
  <div>
    <div class="xqy">
       <h1 class="bt">"{{descData.title}}"</h1>
       
       <div class="xqjs">
         <div>{{descData.desc}}</div>
       </div>
	   <img class="ttp" src="../../../static/images/home.png" />
    </div>
  </div>
</template>

<script>
  export default{
    data(){
      return{
       descData:["title","desc"]
      }
    },
    mounted(){
      this.goodId=this.$route.params.goodId;
      this.getDetail("/static/api/home.json");
    },
    methods:{
      getDetail(url){
        this.$axios.get(url,{
        }).then((res)=>{
          this.datailData=res.data.data.detail;
          this.datailData.forEach((item,index)=>{
            if(item.id==this.goodId){
              this.descData=item;
              }
           })
         /* console.info(this.product); */
        }).catch(err=>{
          console.info(err);
        })

      }
    }
  }
</script>

<!-- /* axios.get("").then(res=>{
          this.datailData=res.data.data.detail;
          this.datailData.forEach((item,index)=>{
            if(item.id==this.goodId){
              this.descData=item;
            }
          })
          console.info(datailData)
        }) */ -->


<style>
  .xqy{
    text-align: center;
  }
  .bt{
    padding-right: 720px;
	
  }
  .ttp{
    width: 700px;
    height: 300px;
	
  }
  .xqjs{
     width: 800px;
	 
  }
</style>
